import socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(('172.30.1.220', 9999))
while True:
    message = input("客户端说：").strip()
    client_socket.send(message.encode('utf-8'))
    data = client_socket.recv(1024)
    decoded_data = data.decode('utf-8')
    print("服务端回答", decoded_data)